<template>
  <div class="pag">
    <el-pagination
      :page-size="size"
      :pager-count="5"
      layout="prev, pager, next"
      :total="total"
      :current-page="numc"
      @current-change="cc"
      @click="$emit('cChange',numc)"
    />
  </div>
</template>

<script setup>
import { ref } from "vue";

const numc = ref(1);

defineProps({
  total: {
    default: 500
  },
  size: {
    default: 10
  }
});

defineEmits(["cChange"]);

function cc(v) {
  numc.value = v;
}
</script>

<style lang="less" scoped>
.pag {
  position: absolute;
  bottom: 8%;
  left: calc(50% - 100px);
}
</style>